<template>
  <basic-table-members
    :table-title="groupMemberTitle"
    :data-source="groupMember"
    :data-params="dataParams"
  />
<!--  <el-table :data="tableData">-->
<!--    <el-table-column-->
<!--      v-for="item in groupMemberTitle"-->
<!--      :prop="item.value"-->
<!--      :label="item.label"-->
<!--    ></el-table-column>-->
<!--  </el-table>-->
</template>

<script>
import BasicTableMembers from '@/components/BasicTable/index.vue'

import { GetGroupMember } from '@/api/GroupMember'

export default {
  name: 'GroupMembers',
  components: { BasicTableMembers },
  props: {
    groupId: { type: String, default: '' }
  },
  data() {
    return {
      groupMember: () => GetGroupMember,
      groupMemberTitle: [
        {
          label: '用户名',
          value: 'UserName',
          show: true
        },
        {
          label: '昵称',
          value: 'NickName',
          show: true
        },
        {
          label: '状态',
          value: 'status',
          show: true,
          transfer: [
            '禁用',
            '可用'
          ]
        },
        {
          label: '禁言时间',
          value: 'MuteTime',
          show: true,
          width: '200'
        },
        {
          label: '加入时间',
          value: 'JoinedOn',
          show: true,
          width: '200'
        }
      ],
      dataParams: {
        groupId: ''
      },
      tableData: null,
      listQuery: {
        pageIndex: 1,
        pageSize: 15
      }
    }
  },
  created() {
    this.dataParams.groupId = this.groupId
  },
  methods: {
    handleCloseDialog(val) {
      this.$emit('handleCloseDialog', val)
    },
    getGroupMembers() {
      GetGroupMember()
    }
  }
}
</script>

<style scoped>

</style>
